<template>
  <view >

  </view>
</template>

<script>
export default {
  data() {
    return {

	
    }
  },
  onLoad(query) {
	let response2 = this.$route.query.response
	// 内容，小程序 开发，微信为期1年的 服务费
	console.log('xxxxxxxxx',response2)
	alert(JSON.stringify(response))
	return
	let response =  JSON.parse(query)
	console.log(response)
    if (!response) {
        console.log('未获取到认证结果参数')
      return
    }
    try {
      this.response = JSON.parse(response)
    } catch (err) {
      console.log('认证结果参数解析失败')
      return
    }
    if (!this.response || !this.response.extInfo?.certifyId) {
     console.log('认证ID缺失')
      return
    }
    this.getAuthResult()
  },
  methods: {
    getAuthResult() {
      const certifyId = this.response.extInfo.certifyId
	  console.log('certifyId',certifyId)
	  this.$cloudOBjAjax('uni-face-recognition-co','getAuthResult',{
		  certifyId:certifyId
	  })
      // const todo = uniCloud.importObject('uni-face-recognition-co', { customUI: true })
      // todo.getAuthResult({ certifyId }).then(res => {
      //   if (res.authState === 'SUCCESS') {
      //    console.log('SUCCESS')
      //   } else {
      //      console.log('认证未通过')
      //   }
      // }).catch(e => {
      //   console.log('认证查询失败')
      // }).finally(() => {
      // })
    }
  }
}
</script>


